<%@ include file = "/common/ini.jsp"%> 
<%@ include file = "ini.jsp"%> 
<%@ include file = "/css/detailcss.jsp"%>
<form name="logoForm">
    <input type='hidden' name='logoFileName' >
</form>

<table border='0' width="100%" height="100%">
<tr>
<%
    
    int counPerTr = 8; // 每行图片个数
    File imageDir = new File(logoDirRealPath);
    File[] files = imageDir.listFiles();
    int count = 0;
    for(int  i = 0; i < files.length; i ++)
    {
        File file = files[i];
        if(file.isFile())
        {
            count ++;
        %>
        <td align="center">
        <input type="image" src="<%= (logoWebDirPath + file.getName())%>"><br>
        <input type="radio" name="imageName" value="<%= file.getName()%>" onclick='choose(this);'>
        </td>
        <%
            if(count%counPerTr ==0)
            {
                out.print("</tr><tr>");
            }

        }
        
    }
%>
<td colspan="<%= counPerTr-count%counPerTr %>">&nbsp;</td>
</tr>
</table>
<script>
    function choose(obj)
    {
        logoForm.logoFileName.value = obj.value;
        top.preLogo.src = "<%= logoWebDirPath%>" + obj.value;
    }
</script>
